.386
.model small, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
.stack 200
.data
@error_resta db "RESULTADO NEGATIVO",10,"$"
@error_overflow db "OVERFLOW EN PRODUCTO",10,"$"
_b dw ?
_a dw ?
_20ul dw 20
_d dw ?
_c dw ?
.code
start:
mov ax, @data
mov ds, ax
MOV ax, _c
MUL ax, _b
MOV bl, axMOV ax, _d
DIV ax, _bl
MOV bx, axMOV bl, _20ul
SUB bl, _bl
MOV ax, _d
MUL ax, _c
MOV bl, axMOV bl, _bl
ADD bl, _bl
jmp fin
overflow:
mov dl, offset @error_overflow
mov ah, 09h
int 21h
jmp fin
res_negativo:
mov dl, offset @error_resta
mov ah, 09h
int 21h
fin:
mov ax, 4c00h
int 21h
end start
